home *** CD-ROM | disk | FTP | other *** search
- on(release){
- if(_parent.PlayingGame)
- {
- if(_parent.CurrentFlipsCount < 999)
- {
- if(!CardMotion.out)
- {
- _parent.CurrentFlipsCount = _parent.CurrentFlipsCount + 1;
- _parent.CurrentFlips = "Flips: " add _parent.CurrentFlipsCount;
- if(_parent.NoOfCardsOut == 0)
- {
- tellTarget("CardMotion")
- {
- gotoAndStop("SpinFront");
- play();
- }
- _parent.NoOfCardsOut = 1;
- _parent.FirstCard = _parent.cardArray[ThisCardNumber - 1];
- _parent.FirstCardName = this._name;
- }
- else if(_parent.NoOfCardsOut == 1)
- {
- tellTarget("CardMotion")
- {
- gotoAndStop("SpinFront");
- play();
- }
- _parent.NoOfCardsOut = 2;
- _parent.SecondCard = _parent.cardArray[ThisCardNumber - 1];
- _parent.SecondCardName = this._name;
- if(_parent.CurrentPairsCount == 11)
- {
- gotoAndPlay(30);
- }
- else
- {
- gotoAndPlay(2);
- }
- }
- else if(_parent.NoOfCardsOut == 2)
- {
- tellTarget("_parent." add _parent.SecondCardName)
- {
- gotoAndStop("DoNothing");
- }
- _parent.NoOfCardsOut = 3;
- gotoAndPlay(30);
- }
- }
- }
- else
- {
- _parent.GameOverPage = "ExcessFlips";
- _parent.gotoAndStop("GameOver");
- }
- }
- }
-